home *** CD-ROM | disk | FTP | other *** search
/ Delphi Magazine Collection 2001 / Delphi Magazine Collection 20001 (2001).iso / DISKS / Issue70 / Clinic / COMSolution1 / ComServer1_TLB.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  2001-04-05  |  3.7 KB  |  83 lines

  1. unit ComServer1_TLB;
  2.  
  3. // ************************************************************************ //
  4. // WARNING                                                                    
  5. // -------                                                                    
  6. // The types declared in this file were generated from data read from a       
  7. // Type Library. If this type library is explicitly or indirectly (via        
  8. // another type library referring to this type library) re-imported, or the   
  9. // 'Refresh' command of the Type Library Editor activated while editing the   
  10. // Type Library, the contents of this file will be regenerated and all        
  11. // manual modifications will be lost.                                         
  12. // ************************************************************************ //
  13.  
  14. // PASTLWTR : $Revision:   1.88.1.0.1.0  $
  15. // File generated on 05/04/2001 12:55:22 from Type Library described below.
  16.  
  17. // ************************************************************************ //
  18. // Type Lib: D:\Magazines\Work In Progress\70 - Jun 01\Clinic\Files\COM Solution 1\ComServer1.tlb (1)
  19. // IID\LCID: {5D3488A0-2347-49CC-8F7C-05C87D7F353E}\0
  20. // Helpfile: 
  21. // DepndLst: 
  22. //   (1) v1.0 BaseLib, (D:\MAGAZI~1\WORKIN~1\70-JUN~1\Clinic\Files\COMSOL~1\BaseLib.tlb)
  23. //   (2) v2.0 stdole, (C:\WINNT\System32\stdole2.tlb)
  24. //   (3) v4.0 StdVCL, (C:\WINNT\System32\STDVCL40.DLL)
  25. // ************************************************************************ //
  26. {$TYPEDADDRESS OFF} // Unit must be compiled without type-checked pointers. 
  27. interface
  28.  
  29. uses Windows, ActiveX, Classes, Graphics, OleServer, OleCtrls, StdVCL, 
  30.   BaseLib_TLB;
  31.  
  32. // *********************************************************************//
  33. // GUIDS declared in the TypeLibrary. Following prefixes are used:        
  34. //   Type Libraries     : LIBID_xxxx                                      
  35. //   CoClasses          : CLASS_xxxx                                      
  36. //   DISPInterfaces     : DIID_xxxx                                       
  37. //   Non-DISP interfaces: IID_xxxx                                        
  38. // *********************************************************************//
  39. const
  40.   // TypeLibrary Major and minor versions
  41.   ComServer1MajorVersion = 1;
  42.   ComServer1MinorVersion = 0;
  43.  
  44.   LIBID_ComServer1: TGUID = '{5D3488A0-2347-49CC-8F7C-05C87D7F353E}';
  45.  
  46.   CLASS_ComClass1: TGUID = '{C0CFFE89-2B19-49CB-B52E-74E890AAE928}';
  47. type
  48.  
  49. // *********************************************************************//
  50. // Declaration of CoClasses defined in Type Library                       
  51. // (NOTE: Here we map each CoClass to its Default Interface)              
  52. // *********************************************************************//
  53.   ComClass1 = IFoo;
  54.  
  55.  
  56. // *********************************************************************//
  57. // The Class CoComClass1 provides a Create and CreateRemote method to          
  58. // create instances of the default interface IFoo exposed by              
  59. // the CoClass ComClass1. The functions are intended to be used by             
  60. // clients wishing to automate the CoClass objects exposed by the         
  61. // server of this typelibrary.                                            
  62. // *********************************************************************//
  63.   CoComClass1 = class
  64.     class function Create: IFoo;
  65.     class function CreateRemote(const MachineName: string): IFoo;
  66.   end;
  67.  
  68. implementation
  69.  
  70. uses ComObj;
  71.  
  72. class function CoComClass1.Create: IFoo;
  73. begin
  74.   Result := CreateComObject(CLASS_ComClass1) as IFoo;
  75. end;
  76.  
  77. class function CoComClass1.CreateRemote(const MachineName: string): IFoo;
  78. begin
  79.   Result := CreateRemoteComObject(MachineName, CLASS_ComClass1) as IFoo;
  80. end;
  81.  
  82. end.
  83.